home *** CD-ROM | disk | FTP | other *** search
/ Aminet 30 / Aminet 30 (1999)(Schatztruhe)[!][Apr 1999].iso / Aminet / dev / lang / SmallEiffel.lha / SmallEiffel / bin_c / pretty8.c < prev    next >
C/C++ Source or Header  |  1998-12-22  |  17KB  |  841 lines

  1. /*
  2. -- ANSI C code generated by :
  3. -- SmallEiffel The GNU Eiffel Compiler -- Release (- 0.79)      --
  4. -- Copyright (C), 1994-98 - LORIA - UHP - CRIN - INRIA - FRANCE --
  5. -- Dominique COLNET and Suzanne COLLIN -    colnet@loria.fr     --
  6. --                 http://www.loria.fr/SmallEiffel              --
  7. */
  8. #include "pretty.h"
  9. /*No:ARRAY[E_REQUIRE].clear_all*/
  10.  
  11.  
  12. void r332add_last(T332* C,T0* a1){
  13. T2 _new_capacity=0;
  14. /*[IF*/
  15. if(((C)->_capacity/*4*/)<((r332count(C))+(1))){
  16. /*[IF*/
  17. if(((C)->_capacity/*4*/)==(0)){
  18. C->_capacity=16;
  19. C->_storage=calloc((C)->_capacity/*4*/,sizeof(T0*));
  20. }
  21. else{
  22. _new_capacity=(2)*((C)->_capacity/*4*/);
  23. C->_storage=r333realloc((C)->_storage/*0*/,(C)->_capacity/*4*/,_new_capacity);
  24. C->_capacity=_new_capacity;
  25. }
  26. /*FI]*/
  27. }
  28. /*FI]*/
  29. C->_upper=((C)->_upper/*8*/)+(1);
  30. /*[IRF3.6put*/{T332* C1=C;
  31. T0* b1=a1;
  32. T2 b2=(C)->_upper/*8*/;
  33. ((C1)->_storage/*0*/)[(b2)-((C1)->_lower/*12*/)]=(b1);
  34. }/*]*/
  35. }
  36.  
  37.  
  38. T0* r332item(T332* C,T2 a1){
  39. T0* R=NULL;
  40. R=((C)->_storage/*0*/)[(a1)-((C)->_lower/*12*/)];
  41. return R;
  42. }
  43. /*No:ARRAY[E_REQUIRE].set_all_with*/
  44.  
  45.  
  46. T6 r332valid_index(T332* C,T2 a1){
  47. T6 R=0;
  48. R=(((C)->_lower/*12*/)<=(a1))&&((a1)<=((C)->_upper/*8*/));
  49. return R;
  50. }
  51.  
  52.  
  53. T2 r332count(T332* C){
  54. T2 R=0;
  55. R=(((C)->_upper/*8*/)-((C)->_lower/*12*/))+(1);
  56. return R;
  57. }
  58. /*No:ARRAY[E_REQUIRE].lower*/
  59.  
  60.  
  61. T6 r332fast_has(T332* C,T0* a1){
  62. T6 R=0;
  63. R=r332valid_index(C,r332fast_index_of(C,a1));
  64. return R;
  65. }
  66.  
  67.  
  68. void r332make(T332* C,T2 a1,T2 a2){
  69. T2 _needed=0;
  70. C->_lower=a1;
  71. C->_upper=a2;
  72. _needed=((a2)-(a1))+(1);
  73. /*[IF*/
  74. if((_needed)>(0)){
  75. /*[IF*/
  76. if(((C)->_capacity/*4*/)<(_needed)){
  77. C->_storage=calloc(_needed,sizeof(T0*));
  78. C->_capacity=_needed;
  79. }
  80. else{
  81. /*[IRF3.6clear_all*/{T332* C1=C;
  82. T0* __value=NULL;
  83. /*[IRF3.6set_all_with*/{T332* C2=C1;
  84. T0* c1=__value;
  85. r333set_all_with((C2)->_storage/*0*/,c1,((C2)->_upper/*8*/)-((C2)->_lower/*12*/));
  86. }/*]*/
  87. }/*]*/
  88. }
  89. /*FI]*/
  90. }
  91. /*FI]*/
  92. }
  93.  
  94.  
  95. T2 r332fast_index_of(T332* C,T0* a1){
  96. T2 R=0;
  97. R=((C)->_lower/*12*/)+(r333fast_index_of((C)->_storage/*0*/,a1,((C)->_upper/*8*/)-((C)->_lower/*12*/)));
  98. return R;
  99. }
  100. /*No:ARRAY[E_REQUIRE].upper*/
  101.  
  102.  
  103. void r332clear(T332* C){
  104. C->_upper=((C)->_lower/*12*/)-(1);
  105. }
  106.  
  107.  
  108. T6 r332empty(T332* C){
  109. T6 R=0;
  110. R=(r332count(C))==(0);
  111. return R;
  112. }
  113. /*No:ARRAY[E_REQUIRE].capacity*/
  114. /*No:ARRAY[E_REQUIRE].put*/
  115. /*No:ARRAY[E_REQUIRE].storage*/
  116.  
  117.  
  118. void r321add_last(T321* C,T0* a1){
  119. T2 _new_capacity=0;
  120. /*[IF*/
  121. if(((C)->_capacity/*4*/)<((r321count(C))+(1))){
  122. /*[IF*/
  123. if(((C)->_capacity/*4*/)==(0)){
  124. C->_capacity=16;
  125. C->_storage=calloc((C)->_capacity/*4*/,sizeof(T0*));
  126. }
  127. else{
  128. _new_capacity=(2)*((C)->_capacity/*4*/);
  129. C->_storage=r320realloc((C)->_storage/*0*/,(C)->_capacity/*4*/,_new_capacity);
  130. C->_capacity=_new_capacity;
  131. }
  132. /*FI]*/
  133. }
  134. /*FI]*/
  135. C->_upper=((C)->_upper/*8*/)+(1);
  136. /*[IRF3.6put*/{T321* C1=C;
  137. T0* b1=a1;
  138. T2 b2=(C)->_upper/*8*/;
  139. ((C1)->_storage/*0*/)[(b2)-((C1)->_lower/*12*/)]=(b1);
  140. }/*]*/
  141. }
  142.  
  143.  
  144. T6 r321valid_index(T321* C,T2 a1){
  145. T6 R=0;
  146. R=(((C)->_lower/*12*/)<=(a1))&&((a1)<=((C)->_upper/*8*/));
  147. return R;
  148. }
  149.  
  150.  
  151. T2 r321count(T321* C){
  152. T2 R=0;
  153. R=(((C)->_upper/*8*/)-((C)->_lower/*12*/))+(1);
  154. return R;
  155. }
  156. /*No:ARRAY[RUN_CLASS].lower*/
  157.  
  158.  
  159. T6 r321fast_has(T321* C,T0* a1){
  160. T6 R=0;
  161. R=r321valid_index(C,r321fast_index_of(C,a1));
  162. return R;
  163. }
  164.  
  165.  
  166. T2 r321fast_index_of(T321* C,T0* a1){
  167. T2 R=0;
  168. R=((C)->_lower/*12*/)+(r320fast_index_of((C)->_storage/*0*/,a1,((C)->_upper/*8*/)-((C)->_lower/*12*/)));
  169. return R;
  170. }
  171. /*No:ARRAY[RUN_CLASS].upper*/
  172. /*No:ARRAY[RUN_CLASS].capacity*/
  173. /*No:ARRAY[RUN_CLASS].put*/
  174. /*No:ARRAY[RUN_CLASS].storage*/
  175.  
  176.  
  177. T0* r88twin(T88* C){
  178. T0* R=NULL;
  179. R=malloc(sizeof(*C));
  180. *((T88*)R)=M88;
  181. r88copy(((T88*)R),((T0*)C));
  182. return R;
  183. }
  184. /*No:ARRAY[ASSERTION].clear_all*/
  185.  
  186.  
  187. void r88add_last(T88* C,T0* a1){
  188. T2 _new_capacity=0;
  189. /*[IF*/
  190. if(((C)->_capacity/*4*/)<((r88count(C))+(1))){
  191. /*[IF*/
  192. if(((C)->_capacity/*4*/)==(0)){
  193. C->_capacity=16;
  194. C->_storage=calloc((C)->_capacity/*4*/,sizeof(T0*));
  195. }
  196. else{
  197. _new_capacity=(2)*((C)->_capacity/*4*/);
  198. C->_storage=r91realloc((C)->_storage/*0*/,(C)->_capacity/*4*/,_new_capacity);
  199. C->_capacity=_new_capacity;
  200. }
  201. /*FI]*/
  202. }
  203. /*FI]*/
  204. C->_upper=((C)->_upper/*8*/)+(1);
  205. /*[IRF3.6put*/{T88* C1=C;
  206. T0* b1=a1;
  207. T2 b2=(C)->_upper/*8*/;
  208. ((C1)->_storage/*0*/)[(b2)-((C1)->_lower/*12*/)]=(b1);
  209. }/*]*/
  210. }
  211. /*No:ARRAY[ASSERTION].set_all_with*/
  212.  
  213.  
  214. T0* r88item(T88* C,T2 a1){
  215. T0* R=NULL;
  216. R=((C)->_storage/*0*/)[(a1)-((C)->_lower/*12*/)];
  217. return R;
  218. }
  219.  
  220.  
  221. T6 r88valid_index(T88* C,T2 a1){
  222. T6 R=0;
  223. R=(((C)->_lower/*12*/)<=(a1))&&((a1)<=((C)->_upper/*8*/));
  224. return R;
  225. }
  226.  
  227.  
  228. T2 r88count(T88* C){
  229. T2 R=0;
  230. R=(((C)->_upper/*8*/)-((C)->_lower/*12*/))+(1);
  231. return R;
  232. }
  233. /*No:ARRAY[ASSERTION].lower*/
  234.  
  235.  
  236. T6 r88fast_has(T88* C,T0* a1){
  237. T6 R=0;
  238. R=r88valid_index(C,r88fast_index_of(C,a1));
  239. return R;
  240. }
  241.  
  242.  
  243. void r88make(T88* C,T2 a1,T2 a2){
  244. T2 _needed=0;
  245. C->_lower=a1;
  246. C->_upper=a2;
  247. _needed=((a2)-(a1))+(1);
  248. /*[IF*/
  249. if((_needed)>(0)){
  250. /*[IF*/
  251. if(((C)->_capacity/*4*/)<(_needed)){
  252. C->_storage=calloc(_needed,sizeof(T0*));
  253. C->_capacity=_needed;
  254. }
  255. else{
  256. /*[IRF3.6clear_all*/{T88* C1=C;
  257. T0* __value=NULL;
  258. /*[IRF3.6set_all_with*/{T88* C2=C1;
  259. T0* c1=__value;
  260. r91set_all_with((C2)->_storage/*0*/,c1,((C2)->_upper/*8*/)-((C2)->_lower/*12*/));
  261. }/*]*/
  262. }/*]*/
  263. }
  264. /*FI]*/
  265. }
  266. /*FI]*/
  267. }
  268.  
  269.  
  270. T2 r88fast_index_of(T88* C,T0* a1){
  271. T2 R=0;
  272. R=((C)->_lower/*12*/)+(r91fast_index_of((C)->_storage/*0*/,a1,((C)->_upper/*8*/)-((C)->_lower/*12*/)));
  273. return R;
  274. }
  275. /*No:ARRAY[ASSERTION].upper*/
  276.  
  277.  
  278. void r88clear(T88* C){
  279. C->_upper=((C)->_lower/*12*/)-(1);
  280. }
  281.  
  282.  
  283. void r88copy(T88* C,T0* a1){
  284. T2 _needed_capacity=0;
  285. C->_lower=(((T88*)a1))->_lower/*12*/;
  286. C->_upper=(((T88*)a1))->_upper/*8*/;
  287. _needed_capacity=(((C)->_upper/*8*/)-((C)->_lower/*12*/))+(1);
  288. /*[IF*/
  289. if(((C)->_capacity/*4*/)<(_needed_capacity)){
  290. C->_capacity=_needed_capacity;
  291. C->_storage=calloc((C)->_capacity/*4*/,sizeof(T0*));
  292. }
  293. /*FI]*/
  294. /*[IF*/
  295. if((_needed_capacity)>(0)){
  296. r91copy_from((C)->_storage/*0*/,(((T88*)a1))->_storage/*0*/,(_needed_capacity)-(1));
  297. }
  298. /*FI]*/
  299. }
  300.  
  301.  
  302. T6 r88empty(T88* C){
  303. T6 R=0;
  304. R=(r88count(C))==(0);
  305. return R;
  306. }
  307. /*No:ARRAY[ASSERTION].capacity*/
  308. /*No:ARRAY[ASSERTION].put*/
  309. /*No:ARRAY[ASSERTION].storage*/
  310.  
  311.  
  312. T0* r222twin(T222* C){
  313. T0* R=NULL;
  314. R=malloc(sizeof(*C));
  315. *((T222*)R)=M222;
  316. r222copy(((T222*)R),((T0*)C));
  317. return R;
  318. }
  319.  
  320.  
  321. void r222add_last(T222* C,T0* a1){
  322. T2 _new_capacity=0;
  323. /*[IF*/
  324. if(((C)->_capacity/*4*/)<((r222count(C))+(1))){
  325. /*[IF*/
  326. if(((C)->_capacity/*4*/)==(0)){
  327. C->_capacity=16;
  328. C->_storage=calloc((C)->_capacity/*4*/,sizeof(T0*));
  329. }
  330. else{
  331. _new_capacity=(2)*((C)->_capacity/*4*/);
  332. C->_storage=r223realloc((C)->_storage/*0*/,(C)->_capacity/*4*/,_new_capacity);
  333. C->_capacity=_new_capacity;
  334. }
  335. /*FI]*/
  336. }
  337. /*FI]*/
  338. C->_upper=((C)->_upper/*8*/)+(1);
  339. /*[IRF3.6put*/{T222* C1=C;
  340. T0* b1=a1;
  341. T2 b2=(C)->_upper/*8*/;
  342. ((C1)->_storage/*0*/)[(b2)-((C1)->_lower/*12*/)]=(b1);
  343. }/*]*/
  344. }
  345.  
  346.  
  347. T0* r222item(T222* C,T2 a1){
  348. T0* R=NULL;
  349. R=((C)->_storage/*0*/)[(a1)-((C)->_lower/*12*/)];
  350. return R;
  351. }
  352.  
  353.  
  354. T2 r222count(T222* C){
  355. T2 R=0;
  356. R=(((C)->_upper/*8*/)-((C)->_lower/*12*/))+(1);
  357. return R;
  358. }
  359. /*No:ARRAY[WHEN_ITEM].lower*/
  360. /*No:ARRAY[WHEN_ITEM].upper*/
  361.  
  362.  
  363. void r222copy(T222* C,T0* a1){
  364. T2 _needed_capacity=0;
  365. C->_lower=(((T222*)a1))->_lower/*12*/;
  366. C->_upper=(((T222*)a1))->_upper/*8*/;
  367. _needed_capacity=(((C)->_upper/*8*/)-((C)->_lower/*12*/))+(1);
  368. /*[IF*/
  369. if(((C)->_capacity/*4*/)<(_needed_capacity)){
  370. C->_capacity=_needed_capacity;
  371. C->_storage=calloc((C)->_capacity/*4*/,sizeof(T0*));
  372. }
  373. /*FI]*/
  374. /*[IF*/
  375. if((_needed_capacity)>(0)){
  376. r223copy_from((C)->_storage/*0*/,(((T222*)a1))->_storage/*0*/,(_needed_capacity)-(1));
  377. }
  378. /*FI]*/
  379. }
  380. /*No:ARRAY[WHEN_ITEM].capacity*/
  381. /*No:ARRAY[WHEN_ITEM].put*/
  382. /*No:ARRAY[WHEN_ITEM].storage*/
  383.  
  384.  
  385. void r352clear_all(T352* C){
  386. T0* _value=NULL;
  387. /*[IRF3.6set_all_with*/{T352* C1=C;
  388. T0* b1=_value;
  389. r246set_all_with((C1)->_storage/*4*/,b1,(C1)->_upper/*12*/);
  390. }/*]*/
  391. }
  392. /*No:FIXED_ARRAY[TYPE].set_all_with*/
  393.  
  394.  
  395. T2 r352count(T352* C){
  396. T2 R=0;
  397. R=((C)->_upper/*12*/)+(1);
  398. return R;
  399. }
  400.  
  401.  
  402. void r352resize(T352* C,T2 a1){
  403. T0* _elt_default=NULL;
  404. T2 _i=0;
  405. T2 _new_capacity=0;
  406. /*[IF*/
  407. if((a1)<=(r352count(C))){
  408. C->_upper=(a1)-(1);
  409. }
  410. else{
  411. _new_capacity=a1;
  412. /*[IF*/
  413. if(((C)->_capacity/*8*/)<(_new_capacity)){
  414. /*[IF*/
  415. if(((C)->_capacity/*8*/)==(0)){
  416. C->_storage=calloc(_new_capacity,sizeof(T0*));
  417. }
  418. else{
  419. C->_storage=r246realloc((C)->_storage/*4*/,(C)->_capacity/*8*/,_new_capacity);
  420. }
  421. /*FI]*/
  422. C->_capacity=_new_capacity;
  423. }
  424. /*FI]*/
  425. _new_capacity=(C)->_upper/*12*/;
  426. C->_upper=(a1)-(1);
  427. _i=(C)->_upper/*12*/;
  428. while (!((_i)==(_new_capacity))) {
  429. /*[IRF3.6put*/{T352* C1=C;
  430. T0* b1=_elt_default;
  431. T2 b2=_i;
  432. ((C1)->_storage/*4*/)[b2]=(b1);
  433. }/*]*/
  434. _i=(_i)-(1);
  435. }
  436. }
  437. /*FI]*/
  438. }
  439.  
  440.  
  441. void r352make(T352* C,T2 a1){
  442. /*[IF*/
  443. if((a1)==(0)){
  444. C->_upper=-(1);
  445. }
  446.  else if(((C)->_capacity/*8*/)==(0)){
  447. C->_storage=calloc(a1,sizeof(T0*));
  448. C->_capacity=a1;
  449. C->_upper=(a1)-(1);
  450. }
  451.  else if(((C)->_capacity/*8*/)<(a1)){
  452. C->_storage=calloc(a1,sizeof(T0*));
  453. C->_capacity=a1;
  454. C->_upper=(a1)-(1);
  455. }
  456. else{
  457. C->_upper=(a1)-(1);
  458. r352clear_all(C);
  459. }
  460. /*FI]*/
  461. }
  462. /*No:FIXED_ARRAY[TYPE].upper*/
  463. /*No:FIXED_ARRAY[TYPE].capacity*/
  464. /*No:FIXED_ARRAY[TYPE].put*/
  465. /*No:FIXED_ARRAY[TYPE].storage*/
  466.  
  467.  
  468. void r354with_capacity(T354* C,T2 a1){
  469. /*[IF*/
  470. if(((C)->_capacity/*8*/)<(a1)){
  471. C->_storage=calloc(a1,sizeof(T0*));
  472. C->_capacity=a1;
  473. }
  474. /*FI]*/
  475. C->_upper=-(1);
  476. }
  477.  
  478.  
  479. T0* r354twin(T354* C){
  480. T0* R=NULL;
  481. R=malloc(sizeof(*C));
  482. *((T354*)R)=M354;
  483. r354copy(((T354*)R),((T0*)C));
  484. return R;
  485. }
  486.  
  487.  
  488. void r354add_last(T354* C,T0* a1){
  489. T2 _new_capacity=0;
  490. /*[IF*/
  491. if((((C)->_upper/*12*/)+(1))<=(((C)->_capacity/*8*/)-(1))){
  492. C->_upper=((C)->_upper/*12*/)+(1);
  493. }
  494.  else if(((C)->_capacity/*8*/)==(0)){
  495. C->_storage=calloc(2,sizeof(T0*));
  496. C->_capacity=2;
  497. C->_upper=0;
  498. }
  499. else{
  500. _new_capacity=(2)*((C)->_capacity/*8*/);
  501. C->_storage=r355realloc((C)->_storage/*4*/,(C)->_capacity/*8*/,_new_capacity);
  502. C->_capacity=_new_capacity;
  503. C->_upper=((C)->_upper/*12*/)+(1);
  504. }
  505. /*FI]*/
  506. /*[IRF3.5put*/((C)->_storage/*4*/)[(C)->_upper/*12*/]=(a1);
  507. /*]*/
  508. }
  509. /*No:FIXED_ARRAY[ADDRESS_OF].item*/
  510. /*No:FIXED_ARRAY[ADDRESS_OF].lower*/
  511. /*No:FIXED_ARRAY[ADDRESS_OF].upper*/
  512.  
  513.  
  514. void r354copy(T354* C,T0* a1){
  515. T2 _new_capacity=0;
  516. T2 _other_upper=0;
  517. _other_upper=(((T354*)a1))->_upper/*12*/;
  518. /*[IF*/
  519. if((_other_upper)>=(0)){
  520. _new_capacity=(_other_upper)+(1);
  521. /*[IF*/
  522. if(((C)->_capacity/*8*/)<(_new_capacity)){
  523. C->_capacity=_new_capacity;
  524. C->_storage=calloc(_new_capacity,sizeof(T0*));
  525. }
  526.  else if(((C)->_capacity/*8*/)>(0)){
  527. r355clear_all((C)->_storage/*4*/,((C)->_capacity/*8*/)-(1));
  528. }
  529. /*FI]*/
  530. r355copy_from((C)->_storage/*4*/,(((T354*)a1))->_storage/*4*/,_other_upper);
  531. }
  532.  else if(((C)->_capacity/*8*/)>(0)){
  533. r355clear_all((C)->_storage/*4*/,((C)->_capacity/*8*/)-(1));
  534. }
  535. /*FI]*/
  536. C->_upper=_other_upper;
  537. }
  538. /*No:FIXED_ARRAY[ADDRESS_OF].capacity*/
  539. /*No:FIXED_ARRAY[ADDRESS_OF].put*/
  540. /*No:FIXED_ARRAY[ADDRESS_OF].storage*/
  541.  
  542.  
  543. void r47with_capacity(T47* C,T2 a1){
  544. /*[IF*/
  545. if(((C)->_capacity/*4*/)<(a1)){
  546. C->_storage=calloc(a1,sizeof(T0*));
  547. C->_capacity=a1;
  548. }
  549. /*FI]*/
  550. C->_upper=-(1);
  551. }
  552. /*No:FIXED_ARRAY[BASE_CLASS].clear_all*/
  553.  
  554.  
  555. void r47add_last(T47* C,T0* a1){
  556. T2 _new_capacity=0;
  557. /*[IF*/
  558. if((((C)->_upper/*8*/)+(1))<=(((C)->_capacity/*4*/)-(1))){
  559. C->_upper=((C)->_upper/*8*/)+(1);
  560. }
  561.  else if(((C)->_capacity/*4*/)==(0)){
  562. C->_storage=calloc(2,sizeof(T0*));
  563. C->_capacity=2;
  564. C->_upper=0;
  565. }
  566. else{
  567. _new_capacity=(2)*((C)->_capacity/*4*/);
  568. C->_storage=r48realloc((C)->_storage/*0*/,(C)->_capacity/*4*/,_new_capacity);
  569. C->_capacity=_new_capacity;
  570. C->_upper=((C)->_upper/*8*/)+(1);
  571. }
  572. /*FI]*/
  573. /*[IRF3.5put*/((C)->_storage/*0*/)[(C)->_upper/*8*/]=(a1);
  574. /*]*/
  575. }
  576. /*No:FIXED_ARRAY[BASE_CLASS].item*/
  577. /*No:FIXED_ARRAY[BASE_CLASS].set_all_with*/
  578.  
  579.  
  580. T6 r47valid_index(T47* C,T2 a1){
  581. T6 R=0;
  582. R=((0)<=(a1))&&((a1)<=((C)->_upper/*8*/));
  583. return R;
  584. }
  585. /*No:FIXED_ARRAY[BASE_CLASS].first*/
  586. /*No:FIXED_ARRAY[BASE_CLASS].count*/
  587. /*No:FIXED_ARRAY[BASE_CLASS].lower*/
  588.  
  589.  
  590. void r47resize(T47* C,T2 a1){
  591. T0* _elt_default=NULL;
  592. T2 _i=0;
  593. T2 _new_capacity=0;
  594. /*[IF*/
  595. if((a1)<=(/*(IRF4.6count*/((C)->_upper/*8*/)+(1)/*)*/)){
  596. C->_upper=(a1)-(1);
  597. }
  598. else{
  599. _new_capacity=a1;
  600. /*[IF*/
  601. if(((C)->_capacity/*4*/)<(_new_capacity)){
  602. /*[IF*/
  603. if(((C)->_capacity/*4*/)==(0)){
  604. C->_storage=calloc(_new_capacity,sizeof(T0*));
  605. }
  606. else{
  607. C->_storage=r48realloc((C)->_storage/*0*/,(C)->_capacity/*4*/,_new_capacity);
  608. }
  609. /*FI]*/
  610. C->_capacity=_new_capacity;
  611. }
  612. /*FI]*/
  613. _new_capacity=(C)->_upper/*8*/;
  614. C->_upper=(a1)-(1);
  615. _i=(C)->_upper/*8*/;
  616. while (!((_i)==(_new_capacity))) {
  617. /*[IRF3.5put*/((C)->_storage/*0*/)[_i]=(_elt_default);
  618. /*]*/
  619. _i=(_i)-(1);
  620. }
  621. }
  622. /*FI]*/
  623. }
  624.  
  625.  
  626. T6 r47fast_has(T47* C,T0* a1){
  627. T6 R=0;
  628. R=r47valid_index(C,r47fast_index_of(C,a1));
  629. return R;
  630. }
  631.  
  632.  
  633. void r47make(T47* C,T2 a1){
  634. /*[IF*/
  635. if((a1)==(0)){
  636. C->_upper=-(1);
  637. }
  638.  else if(((C)->_capacity/*4*/)==(0)){
  639. C->_storage=calloc(a1,sizeof(T0*));
  640. C->_capacity=a1;
  641. C->_upper=(a1)-(1);
  642. }
  643.  else if(((C)->_capacity/*4*/)<(a1)){
  644. C->_storage=calloc(a1,sizeof(T0*));
  645. C->_capacity=a1;
  646. C->_upper=(a1)-(1);
  647. }
  648. else{
  649. C->_upper=(a1)-(1);
  650. /*[IRF3.6clear_all*/{T47* C1=C;
  651. T0* __value=NULL;
  652. /*[IRF3.6set_all_with*/{T47* C2=C1;
  653. T0* c1=__value;
  654. r48set_all_with((C2)->_storage/*0*/,c1,(C2)->_upper/*8*/);
  655. }/*]*/
  656. }/*]*/
  657. }
  658. /*FI]*/
  659. }
  660.  
  661.  
  662. T2 r47fast_index_of(T47* C,T0* a1){
  663. T2 R=0;
  664. R=r48fast_index_of((C)->_storage/*0*/,a1,(C)->_upper/*8*/);
  665. return R;
  666. }
  667. /*No:FIXED_ARRAY[BASE_CLASS].upper*/
  668. /*No:FIXED_ARRAY[BASE_CLASS].clear*/
  669. /*No:FIXED_ARRAY[BASE_CLASS].capacity*/
  670. /*No:FIXED_ARRAY[BASE_CLASS].put*/
  671. /*No:FIXED_ARRAY[BASE_CLASS].storage*/
  672.  
  673.  
  674. void r134with_capacity(T134* C,T2 a1){
  675. /*[IF*/
  676. if(((C)->_capacity/*8*/)<(a1)){
  677. C->_storage=calloc(a1,sizeof(T0*));
  678. C->_capacity=a1;
  679. }
  680. /*FI]*/
  681. C->_upper=-(1);
  682. }
  683.  
  684.  
  685. T0* r134twin(T134* C){
  686. T0* R=NULL;
  687. R=malloc(sizeof(*C));
  688. *((T134*)R)=M134;
  689. r134copy(((T134*)R),((T0*)C));
  690. return R;
  691. }
  692.  
  693.  
  694. void r134add_last(T134* C,T0* a1){
  695. T2 _new_capacity=0;
  696. /*[IF*/
  697. if((((C)->_upper/*12*/)+(1))<=(((C)->_capacity/*8*/)-(1))){
  698. C->_upper=((C)->_upper/*12*/)+(1);
  699. }
  700.  else if(((C)->_capacity/*8*/)==(0)){
  701. C->_storage=calloc(2,sizeof(T0*));
  702. C->_capacity=2;
  703. C->_upper=0;
  704. }
  705. else{
  706. _new_capacity=(2)*((C)->_capacity/*8*/);
  707. C->_storage=r95realloc((C)->_storage/*4*/,(C)->_capacity/*8*/,_new_capacity);
  708. C->_capacity=_new_capacity;
  709. C->_upper=((C)->_upper/*12*/)+(1);
  710. }
  711. /*FI]*/
  712. /*[IRF3.6put*/{T134* C1=C;
  713. T0* b1=a1;
  714. T2 b2=(C)->_upper/*12*/;
  715. ((C1)->_storage/*4*/)[b2]=(b1);
  716. }/*]*/
  717. }
  718.  
  719.  
  720. T0* r134item(T134* C,T2 a1){
  721. T0* R=NULL;
  722. R=((C)->_storage/*4*/)[a1];
  723. return R;
  724. }
  725. /*No:FIXED_ARRAY[EXPRESSION].lower*/
  726. /*No:FIXED_ARRAY[EXPRESSION].upper*/
  727.  
  728.  
  729. void r134copy(T134* C,T0* a1){
  730. T2 _new_capacity=0;
  731. T2 _other_upper=0;
  732. _other_upper=/*X134upper*/((T2)(((T134*)a1))->_upper/*12*/);
  733. /*[IF*/
  734. if((_other_upper)>=(0)){
  735. _new_capacity=(_other_upper)+(1);
  736. /*[IF*/
  737. if(((C)->_capacity/*8*/)<(_new_capacity)){
  738. C->_capacity=_new_capacity;
  739. C->_storage=calloc(_new_capacity,sizeof(T0*));
  740. }
  741.  else if(((C)->_capacity/*8*/)>(0)){
  742. r95clear_all((C)->_storage/*4*/,((C)->_capacity/*8*/)-(1));
  743. }
  744. /*FI]*/
  745. r95copy_from((C)->_storage/*4*/,/*X134storage*/((T95)(((T134*)a1))->_storage/*4*/),_other_upper);
  746. }
  747.  else if(((C)->_capacity/*8*/)>(0)){
  748. r95clear_all((C)->_storage/*4*/,((C)->_capacity/*8*/)-(1));
  749. }
  750. /*FI]*/
  751. C->_upper=_other_upper;
  752. }
  753. /*No:FIXED_ARRAY[EXPRESSION].capacity*/
  754. /*No:FIXED_ARRAY[EXPRESSION].storage*/
  755. /*No:FIXED_ARRAY[EXPRESSION].put*/
  756.  
  757.  
  758. void r180with_capacity(T180* C,T2 a1){
  759. /*[IF*/
  760. if(((C)->_capacity/*4*/)<(a1)){
  761. C->_storage=calloc(a1,sizeof(T0*));
  762. C->_capacity=a1;
  763. }
  764. /*FI]*/
  765. C->_upper=-(1);
  766. }
  767.  
  768.  
  769. void r180add_last(T180* C,T0* a1){
  770. T2 _new_capacity=0;
  771. /*[IF*/
  772. if((((C)->_upper/*8*/)+(1))<=(((C)->_capacity/*4*/)-(1))){
  773. C->_upper=((C)->_upper/*8*/)+(1);
  774. }
  775.  else if(((C)->_capacity/*4*/)==(0)){
  776. C->_storage=calloc(2,sizeof(T0*));
  777. C->_capacity=2;
  778. C->_upper=0;
  779. }
  780. else{
  781. _new_capacity=(2)*((C)->_capacity/*4*/);
  782. C->_storage=r181realloc((C)->_storage/*0*/,(C)->_capacity/*4*/,_new_capacity);
  783. C->_capacity=_new_capacity;
  784. C->_upper=((C)->_upper/*8*/)+(1);
  785. }
  786. /*FI]*/
  787. /*[IRF3.5put*/((C)->_storage/*0*/)[(C)->_upper/*8*/]=(a1);
  788. /*]*/
  789. }
  790. /*No:FIXED_ARRAY[CLASS_NAME].item*/
  791. /*No:FIXED_ARRAY[CLASS_NAME].upper*/
  792. /*No:FIXED_ARRAY[CLASS_NAME].capacity*/
  793. /*No:FIXED_ARRAY[CLASS_NAME].storage*/
  794. /*No:FIXED_ARRAY[CLASS_NAME].put*/
  795.  
  796.  
  797. void r307add_last(T307* C,T0* a1){
  798. T2 _new_capacity=0;
  799. /*[IF*/
  800. if(((C)->_capacity/*4*/)<((r307count(C))+(1))){
  801. /*[IF*/
  802. if(((C)->_capacity/*4*/)==(0)){
  803. C->_capacity=16;
  804. C->_storage=calloc((C)->_capacity/*4*/,sizeof(T0*));
  805. }
  806. else{
  807. _new_capacity=(2)*((C)->_capacity/*4*/);
  808. C->_storage=r308realloc((C)->_storage/*0*/,(C)->_capacity/*4*/,_new_capacity);
  809. C->_capacity=_new_capacity;
  810. }
  811. /*FI]*/
  812. }
  813. /*FI]*/
  814. C->_upper=((C)->_upper/*8*/)+(1);
  815. /*[IRF3.6put*/{T307* C1=C;
  816. T0* b1=a1;
  817. T2 b2=(C)->_upper/*8*/;
  818. ((C1)->_storage/*0*/)[(b2)-((C1)->_lower/*12*/)]=(b1);
  819. }/*]*/
  820. }
  821.  
  822.  
  823. T0* r307item(T307* C,T2 a1){
  824. T0* R=NULL;
  825. R=((C)->_storage/*0*/)[(a1)-((C)->_lower/*12*/)];
  826. return R;
  827. }
  828.  
  829.  
  830. T2 r307count(T307* C){
  831. T2 R=0;
  832. R=(((C)->_upper/*8*/)-((C)->_lower/*12*/))+(1);
  833. return R;
  834. }
  835. /*No:ARRAY[INDEX_CLAUSE].lower*/
  836. /*No:ARRAY[INDEX_CLAUSE].upper*/
  837. /*No:ARRAY[INDEX_CLAUSE].capacity*/
  838. /*No:ARRAY[INDEX_CLAUSE].put*/
  839. /*No:ARRAY[INDEX_CLAUSE].storage*/
  840.  
  841.